import Vue from 'vue'
import App from './App.vue'
import router from './router'
import commonFun from './utils/common'
import storage from './utils/storage'
import global from './utils/global'
import axios from './utils/axios'

// 表格
import zTable from '@/components/view/table'
Vue.component('z-table', zTable)
// 全局消息
import Message from '@/components/message'
Vue.prototype.$Message = Message.install
// 剪切板
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
// 语法高亮
import VueHighlightJS from 'vue-highlightjs'
import 'highlight.js/styles/default.css'
Vue.use(VueHighlightJS)
// 基础布局
import layoutBase from './pages/layout/base'
Vue.component('layout-base', layoutBase)
// 加载遮罩
import loading from '@/components/feedback/loading'
Vue.component('loading', loading)
// 下拉框
import dropdown from '@/components/navigation/dropdown'
Vue.component('dropdown', dropdown)
// 模态框
import modal from '@/components/modal/base'
Vue.component('modal', modal)

Vue.config.productionTip = false
// 是否缓存了用户信息
var user = storage.get('user')
if(user) global.user = user
// 全局数据
Vue.prototype.$global = global
// 常用方法
Vue.prototype.$zp = commonFun
// 本地缓存
Vue.prototype.$storage = storage
// axios请求
Vue.prototype.$http = axios

new Vue({
  router,
	render: h => h(App)
}).$mount('#app')
